import { useState } from 'react';
// Partial 所有类型变成可选类型
export default () => {
  const [searchArticleListM, setSearchArticleListM] = useState<ARTICLEAPI.EsArticle[]>([]);
  const [searchStrM, setSearchStrM] = useState<string>();
  const changeSearchArticleListM = (vals: ARTICLEAPI.EsArticle[]) => {
    setSearchArticleListM(vals);
  };

  const changeSearchStrM = (val: string) => {
    setSearchStrM(val);
  };

  return {
    searchArticleListM,
    searchStrM,
    changeSearchArticleListM,
    changeSearchStrM,
  };
};
